from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait

op = webdriver.ChromeOptions()
op.add_experimental_option('excludeSwitches', ['enable-automation'])
op.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=op)

driver.get("https://jqueryui.com/resources/demos/slider/multiple-vertical.html")
mouse = WebDriverWait(driver,5,0.5)
progress=ActionChains(driver)
#横进度条
h1 = driver.find_element(By.CSS_SELECTOR,"#master > span")
#竖进度条
s1 = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(1) > span")
s2 = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(2) > span")
s3 = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(3) > span")
s4 = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(4) > span")
s5 = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(5) > span")
s6 = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(6) > span")
s7 = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(7) > span")
progress.drag_and_drop_by_offset(h1,xoffset=65,yoffset=0).perform()
progress.drag_and_drop_by_offset(s1,xoffset=0,yoffset=10).perform()
progress.drag_and_drop_by_offset(s2,xoffset=0,yoffset=-5).perform()
progress.drag_and_drop_by_offset(s4,xoffset=0,yoffset=20).perform()
progress.drag_and_drop_by_offset(s5,xoffset=0,yoffset=25).perform()
progress.drag_and_drop_by_offset(s6,xoffset=0,yoffset=30).perform()
progress.drag_and_drop_by_offset(s7,xoffset=0,yoffset=35).perform()
sleep(2)
driver.quit()